﻿using System.Collections.Generic;
using System.Windows.Forms;

namespace WinUtilities.Class
{
    public class SearchItem
    {
        //Constructor
        public SearchItem()
        {

        }

        public SearchItem(string name, string fieldName, EnumFieldType fieldType, int fieldLength)
        {
            Name = name;
            FieldName = fieldName;
            FieldType = fieldType;
            FieldLength = fieldLength;
        }
        public SearchItem(string name, string fieldName)
        {
            Name = name;
            FieldName = fieldName;
        }
        public enum EnumFieldType
        {
            Text,
            Combo
        }
        public string Name { get; set; }
        public string FieldName { get; set; }
        public EnumFieldType FieldType { get; set; }
        public int FieldLength { get; set; }
        //public void GetObjectData(SerializationInfo info, StreamingContext context)
        //{
        //    info.AddValue("Name", this.Name);
        //    info.AddValue("FieldName", this.FieldName);
        //    info.AddValue("FieldLength", this.FieldLength);
        //    info.AddValue("FieldType", this.FieldType);
        //}

        

        //public SearchItem(SerializationInfo info, StreamingContext context)
        //{
        //    Name = (string)info.GetValue("Name", typeof(string));
        //    FieldName = (string)info.GetValue("FieldName", typeof(string));
        //    FieldLength = (int)info.GetValue("FieldLength", typeof(int));
        //    FieldType = (EnumFieldType)info.GetValue("FieldType", typeof(EnumFieldType));
        //}

       
    }
    
}
